#!/usr/local/bin/python3
# -*- coding: UTF-8 -*-
"""
@author:apple
@file:property_demo01.py
@time:2021/08/31
"""

class Person:
    ...
    def __init__(self,name,age):
        self.__name = name
        self.__age = age

    @property
    def name(self):
        return self.__name

    @name.setter
    def name(self, name):
        self.__name = name

    @name.deleter
    def name(self):
        del self.__name


if __name__ == '__main__':
    pass
    per = Person('zhangsan',21)
    print(type(per))
    print(per.name)
    per.name = "lisi"
    print(per.name)